package com.szcinda.service.dto.containerOrder;

import lombok.Data;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Data
public class ContainerOrderDto implements Serializable {
    public String id;
    public String businessNumber;
    public String clientId;
    public String clientName;
    public String cabinetNumber;
    public String cabinetType;
    public LocalDate pickDate; // 提箱日期
    public String pickNumber;  // 提箱码
    public long lessReturnDays; // 剩余还箱天数
    public LocalDate preReturnDate; // 预计还箱日期
    public LocalDate actReturnDate; // 实际还箱日期
    public long beyondDays; // 超出天数
    public String packageType;
    public String packageTypeName;
    public String returnPlace;
    public String returnCommand; // 还箱令
    public String carFile;
    public String orderNumber;
    public String remark;
    public String organizationId;
    public String organizationName;

    // 封账后不允许修改
    private boolean lock;

    private long useDays;

    public String userName;
    private LocalDateTime createTime;


    public static Map<String, String> getFieldMap() {
        Map<String, String> map = new HashMap<>();
        map.put("业务编号", "businessNumber");
        map.put("所属机构", "organizationName");
        map.put("客户", "clientName");
        map.put("柜号", "cabinetNumber");
        map.put("柜型", "cabinetType");
        map.put("提箱日期", "pickDate");
        map.put("提箱码", "pickNumber");
        map.put("还箱剩余天数", "lessReturnDays");
        map.put("预计还箱日期", "preReturnDate");
        map.put("实际还箱日期", "actReturnDate");
        map.put("超出天数", "beyondDays");
        map.put("还箱地", "returnPlace");
        map.put("还箱状态", "packageTypeName");
        map.put("还箱令", "returnCommand");
        map.put("随车文件", "carFile");
        map.put("运单", "orderNumber");
        map.put("备注", "remark");
        return map;
    }

    public static List<String> getFieldList(){
        List<String> list = new ArrayList<>();
        list.add("业务编号");
        list.add("所属机构");
        list.add("客户");
        list.add("柜号");
        list.add("柜型");
        list.add("提箱日期");
        list.add("提箱码");
        list.add("还箱剩余天数");
        list.add("预计还箱日期");
        list.add("实际还箱日期");
        list.add("超出天数");
        list.add("还箱地");
        list.add("还箱状态");
        list.add("还箱令");
        list.add("随车文件");
        list.add("运单");
        list.add("备注");
        return list;
    }
}
